package com.pinkpig.excel.row;


import com.pinkpig.excel.metadata.TableMetaData;
import com.pinkpig.excel.row.model.ColumnTableHeadModel;
import com.pinkpig.excel.row.model.RowModel;

import java.util.ArrayList;
import java.util.List;

/**
 * @author vincenfeng
 */
public class ColumnTableHeadModelBuilder implements RowModelBuilder<TableMetaData> {

    @Override
    public List<RowModel> build(TableMetaData tableMetaData){
        List<RowModel> rows = new ArrayList<>();
        ColumnTableHeadModel columnTableRowModel = new ColumnTableHeadModel();
        columnTableRowModel.setTableName(tableMetaData.getTableName());
        columnTableRowModel.setTableNameCh(tableMetaData.getRemarks());
        rows.add(columnTableRowModel);
        return rows;
    }

}
